package com.zjb.accountManager.Kits;

import com.jfinal.core.Controller;

public class AuthKit {

	public static final int DEFAULT_USERID = 0;
	public static final String DEFAULT_ACCOUNT = "";
	
	public static void setAuthorize(Controller controller, int userId, String account) {
		controller.setSessionAttr("userId", userId);
		controller.setSessionAttr("account", account);
	}
	
	public static void clearAuthorize(Controller controller) {
		controller.setSessionAttr("userId", DEFAULT_USERID);
		controller.setSessionAttr("account", DEFAULT_ACCOUNT);
	}
}
